x86: Fix Xen boot on 8-node AMD machines
authorKeir Fraser <keir.fraser@citrix.com>
Fri, 23 May 2008 10:15:19 +0000 (11:15 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Fri, 23 May 2008 10:15:19 +0000 (11:15 +0100)
commit2b2408c9871d6b77b09969c09e7c80af4130893a
tree6b35c11a4900b584c9a21ca9fe2fee377772cf54
parent407c970b5201e4cf7fe506b2def54517b5f9b1e2
x86: Fix Xen boot on 8-node AMD machines

In xen/arch/x86/cpu/amd.c the function disable_c1_ramping iterates
over the northbridges using NR_CPUS as an upper bound for the number of
nodes. If there are no more northbridges found, it stops iterating.
Sadly it just adds the northbridge number to 0x18 and uses this as a
PCI device number, so probing the 9th northbridge on an 8 node system will
be caught by the newly inserted assertion in pci_conf_read in current
unstable. We fix this by first querying the number of nodes from the
first northbridge to avoid the overflow.

Signed-off-by: Andre Przywara <andre.przywara@amd.com>
Verified by Mark.Johnson@sun.com
xen/arch/x86/cpu/amd.c